<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>使用JavaScript表达式</title>
</head>
<body>

<div id="app">
    {{number + 1}}<br/>
    {{ok ? 'yes' : 'no'}}<br/>
    {{message.split('').reverse().join('')}}<br/>
    <div v-bind:id="'list-' + id"></div>

    <!--  下面这些都不会生效  -->
<!--    {{var a = 1}}-->
<!--    {{if (ok){return message}}}-->

</div>

<script src="../js/vue.js"></script>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            number: 100,
            ok: true,
            message: 'Hello',
            id: 100
        }
    })
</script>
</body>
</html>